/*   Copyright (C) 2011 Wolfgang Hankeln, Norma J. Wendel
 *
 *   This file is part of CDinFusion.
 *
 *   CDinFusion is free software: you can redistribute it and/or
 *   modify it under the terms of the GNU Lesser builder Public 
 *   License in version 3 (LGPL3) as published by the Free Software
 *   Foundation version 3 of the License.
 *
 *   CDinFusion is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *   Lesser builder Public License for more details.
 *
 *   You should have received a copy of the Lesser builder Public
 *   License along with CDinFusion; see the file COPYING. If not,
 *   write to the Free Software Foundation, 59 Temple Place - Suite 330,
 *   Boston, MA 02111-1307, USA or see <http://www.gnu.org/licenses/>.
 *   
 *   If you have any questions, send an email to: megx@mpi-bremen.de.
 */
package org.cdinfusion.data;

public class CDFastaHeader {
    private String collectedby;

    private String authority;

    private String organism;

    private String isolation_source;

    public String getCollectedby() {
	return collectedby;
    }

    public void setCollectedby(String collectedby) {
	this.collectedby = collectedby;
    }

    public String getAuthority() {
	return authority;
    }

    public void setAuthority(String authority) {
	this.authority = authority;
    }

    public String getOrganism() {
	return organism;
    }

    public void setOrganism(String organism) {
	this.organism = organism;
    }

    public String getIsolation_source() {
	return isolation_source;
    }

    public void setIsolation_source(String isolation_source) {
	this.isolation_source = isolation_source;
    }

    public CDFastaHeader() {
	super();
    }

    public CDFastaHeader(String collectedby, String authority, String organism, String isolation_source) {
	super();
	this.collectedby = collectedby;
	this.authority = authority;
	this.organism = organism;
	this.isolation_source = isolation_source;
    }

    public String toString() {
	final StringBuilder builder = new StringBuilder(200);
	if (this.getAuthority().length() > 0) {
	    builder.append(" [authority=");
	    builder.append(this.getAuthority());
	    builder.append("]");
	}
	if (this.getCollectedby().length() > 0) {
	    builder.append(" [collected-by=");
	    builder.append(this.getCollectedby());
	    builder.append("]");
	}
	if (this.getOrganism().length() > 0) {
	    builder.append(" [organism=");
	    builder.append(this.getOrganism());
	    builder.append("]");
	}
	if (this.getIsolation_source().length() > 0) {
	    builder.append(" [isolation-source=");
	    builder.append(this.getIsolation_source());
	    builder.append("]");
	}

	return builder.toString();
    }
}